With the development of information technologies, more and more digital terminals provide photographing and videorecording functions, for example, portable videorecorder, portable camera, mobile terminal with photographing and/or videorecording functions, telephone terminal with the videophone function, and videoconference terminal. Such terminals include a processor for processing the image and video data obtained by an image or video obtaining apparatus. At the time of obtaining the image or video, when the target which is photographed exists before a bright background or light source, the target which is photographed is in the backlight state. The images or videos obtained in the backlight state have a bright background but the foreground target is very dim. The images or videos obtained in a backlight environment are so deteriorated that the targets are hardly distinguishable. For example, the portrait in an image or a video photographed in the backlight state is so dim that the figures in the image or video are hardly distinguishable.
After an image or a video is obtained in a backlight environment, the image or video may undergo backlight compensation, or also known as backlight correction. The backlight compensation is performed by using two methods. One method is: The exposure intensity is controlled at the time of videorecording or photographing; at the time of photographing, a component like a light detector is used to detect whether the target is in a backlight environment, and, if the target is in a backlight environment, the light detector generates a signal for controlling the camera to flash forcibly or the exposure time of the photographing is prolonged. In this way, the luminance of the target can be increased. Such a method is defective in that: When the luminance of the target is increased, the luminance of the background is also increased so that the bright background is overexposed, the background part takes on large white patches, and the details of the background are not distinguishable. Moreover, because such a method intensifies the exposure of the entire image or video, the contrast of the image or video is deteriorated seriously.
The other method is: By using a signal processing method, the signals of a photographed image or video are reprocessed. One technical solution is: First, the backlight parameter based on the average luminance difference of the image and the backlight parameter based on the image histogram are obtained, and the total backlight parameter of the image is obtained according to such two backlight parameters. Then, the background importance parameter of the image is obtained. Finally, the total backlight parameter, the background importance parameter, the average luminance of the image are used as inputs, a compensation rate is output according to scores of blur rules specified beforehand, and the entire image undergoes luminance compensation by using the compensation rate. The method is defective in the following:
(1) Scores of blur rules are formulated according to the blur logic control method to obtain a compensation rate, which is rather complicated.
(2) The image needs to be sectioned to obtain the backlight parameter based on the average luminance difference of the image and the backlight parameter based on the image histogram, which is not much universally applicable.
(3) Because a compensation rate is used to compensate for the luminance of the entire image, the contrast of the image is deteriorated.
Another technical solution of the preceding method is: An image is divided into a background area and a target area; the mean value and the variance of the background area, and the mean value and the variance of the target area are obtained; the four parameters which are obtained are input into the blur system to obtain a compensation rate; the pixel points whose luminance is less than a fixed value undergo backlight compensation at the compensation rate, and the pixel points whose luminance is greater than the fixed value do not undergo backlight compensation; and finally, the image that has undergone backlight compensation is treated through stretch of the contrast to increase the contrast of the image. The method is defective in the following:
(1) The compensation rate is determined by means of blur logic control, which is rather complicated.
(2) The pixel points whose luminance is less than a fixed value undergo backlight compensation at the same compensation rate, which is known as linear compensation and leads to loss of the chromatic information of the image.
(3) The pixel points whose luminance is less than a fixed value undergo backlight compensation but the pixel points whose luminance is greater than a fixed value undergo no backlight compensation, and therefore, the luminance of the pixel point which has undergone backlight compensation and corresponds to the original fixed-value luminance may deviate from the original fixed-value luminance by far, and the entire image is layered and the luminance is discontinuous after the backlight compensation.
(4) The contrast stretch leads to too high luminance of the target.